#!/usr/bin/perl

use Env;

#my $path, $fs, $bt, $bu, $ft, $fu;

foreach (@ARGV)
{
	if(/path=(.*)/)
	{
		$path = $1;
	}
	if(/fs=(.*)/)
	{
		$fs = $1;
	}
	if(/bt=(.*)/)
	{
		$bt = $1;
	}
	if(/bu=(.*)/)
	{
		$bu = $1;
	}
}


#$ENV{"VISUAL"}="/usr/libexec/webmin/quotamin/edgrace.pl";
#$ENV{"QUOTA_FILESYS"}= "/home";
#$ENV{"QUOTA_BTIME"}=15;
#$ENV{"QUOTA_BUNITS"}=3;
#$ENV{"QUOTA_FTIME"}=15;
#$ENV{"QUOTA_FUNITS"}=3;
#system("edquota -u -t");

$ENV{"VISUAL"}= "$path/edgrace.pl";
$ENV{"QUOTA_FILESYS"}= $fs;
$ENV{"QUOTA_BTIME"}=$bt;
$ENV{"QUOTA_BUNITS"}=$bu;
$ENV{"QUOTA_FTIME"}=$ft;
$ENV{"QUOTA_FUNITS"}=$fu;
system("edquota -u -t 2>/dev/null");
